package edu.spec.ycloud.service;

import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.MqttCallback;
import org.eclipse.paho.client.mqttv3.MqttCallbackExtended;
import org.eclipse.paho.client.mqttv3.MqttMessage;

/**
 * Author       : MadFrog
 * Date         : 2018/8/21 10:16
 * Description  :
 */
public class OutboundCallback implements MqttCallbackExtended {


    @Override
    public void connectComplete(boolean b, String s) {
        System.out.println("connectComplete. b=" + b + ", s=" + s);
    }

    @Override
    public void connectionLost(Throwable throwable) {
        System.out.println("connectionLost." + throwable);
    }

    @Override
    public void messageArrived(String s, MqttMessage mqttMessage) throws Exception {
        System.out.println("messageArrived. s=" + s + ", mqttMessage=" + mqttMessage);
    }

    @Override
    public void deliveryComplete(IMqttDeliveryToken iMqttDeliveryToken) {
        System.out.println("deliveryComplete.");
    }
}
